The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for optimizing and enhancing performance for parity based storage, particularly redundant array of independent disk (RAID) storage.
Redundant Array of Independent Disks (RAID), is a technology that provides increased storage functions and reliability through redundancy. This is achieved by combining multiple disk drive components into a logical unit, where data is distributed across the drives in one of several ways called “RAID levels.” RAID is an example of storage virtualization. RAID is now used as an umbrella term for computer data storage schemes that can divide and replicate data among multiple physical disk drives. The physical disks are said to be in a RAID array, which is accessed by the operating system as one single disk. The different schemes or architectures are named by the word RAID followed by a number (e.g., RAID 0, RAID 1). Each scheme provides a different balance between two key goals: increase data reliability and increase input/output performance.
A number of standard schemes have evolved which are referred to as levels. There were five RAID levels originally conceived, but many more variations have evolved, notably several nested levels and many non-standard levels (mostly proprietary).
RAID 0 (block-level striping without parity or mirroring has no (or zero) redundancy. RAID 0 provides improved performance and additional storage but no fault tolerance. Simple stripe sets are normally referred to as RAID 0. Any disk failure destroys the array, and the likelihood of failure increases with more disks in the array. A single disk failure destroys the entire array because when data is written to a RAID 0 volume, the data is broken into fragments called blocks. The number of blocks is dictated by the stripe size, which is a configuration parameter of the array. The blocks are written to their respective disks simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, increasing bandwidth. RAID 0 does not implement error checking, so any error is uncorrectable. More disks in the array means higher bandwidth, but greater risk of data loss.
In RAID 1 (mirroring without parity or striping), data is written identically to multiple disks (a “mirrored set”). The array continues to operate as long as at least one drive is functioning. With appropriate operating system support, there can be increased read performance, and only a minimal write performance reduction; implementing RAID 1 with a separate controller for each disk in order to perform simultaneous reads (and writes) is sometimes called multiplexing (or duplexing when there are only 2 disks).
In RAID 2 (bit-level striping with dedicated Hamming-code parity), all disk spindle rotation is synchronized, and data is striped such that each sequential bit is on a different disk. Hamming-code parity is calculated across corresponding bits on disks and stored on at least one parity disk.
in RAID 3 (byte-level striping with dedicated parity), all disk spindle rotation is synchronized, and data is striped so each sequential byte is on a different disk. Parity is calculated across corresponding bytes on disks and stored on a dedicated parity disk.
RAID 4 (block-level striping with dedicated parity) is identical to RAID 5 (see below), but confines all parity data to a single disk, which can create a performance bottleneck. In this setup, files can be distributed between multiple disks. Each disk operates independently which allows I/O requests to be performed in parallel, though data transfer speeds can suffer due to the type of parity. The error detection is achieved through dedicated parity and is stored in a separate, single disk unit.
RAID 5 (block-level striping with distributed parity) distributes parity along with the data and requires all drives but one to be present to operate; the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. However, a single drive failure results in reduced performance of the entire array until the failed drive has been replaced and the associated data rebuilt.
RAID 6 (block-level striping with double distributed parity) provides fault tolerance of two drive failures. The array continues to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high-availability systems. This becomes increasingly important as large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single-parity RAID levels are as vulnerable to data loss as a RAID 0 array until the failed drive is replaced and its data rebuilt. The larger the drive, the longer the rebuild takes. Double parity gives time to rebuild the array without the data being at risk if a single additional drive fails before the rebuild is complete.
Many RAID levels employ an error protection scheme called “parity.” The XOR parity calculation is a widely used method in information technology to provide fault tolerance in a given set of data. In Boolean logic, there is an operation called exclusive or (XOR), meaning “one or the other, but not neither and not both.” The XOR operator is central to how parity data is created and used within an array. It is used both for the protection of data, as well as for the recovery of missing data. Thus, a RAID controller must perform the XOR command every time a stripe is written to create parity.